package com.nbjtjc.safe.mapper.edu;

import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import com.nbjtjc.safe.model.edu.EduDailyNotify;
import com.nbjtjc.util.MyMapper;
@Mapper
public interface EduDailyNotifyMapper extends MyMapper<EduDailyNotify> {
	@Select("select * from edu_daily_notify where cancel != 1 and info_id = #{infoId}")
	List<EduDailyNotify> findByInfoId(@Param("infoId") int infoId);
	
	@Update("update edu_daily_notify set cancel = 1 where info_id = #{infoId}")
	int cancelByInfoId(@Param("infoId") int infoId);
	
	@Update("update edu_daily_notify set cancel = 1 where id = #{id}")
	int cancelByPrimaryKey(@Param("id") Integer id);
}